<?php
namespace App\Http\Controllers\Api\V1\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class WithdrawResource extends JsonResource
{
    public function toArray($request)
    {
    	$data = $this->resource;
    	
        return [
	        'id' => $data->id,
	        'user_id' => $data->user_id,
	        'number' => $data->number,
	        'target_amount' => $data->target_amount,
	        'charge_type' => $data->charge_type,
	        'charge_amount' => $data->charge_amount,
	        'actual_amount' => $data->actual_amount,
	        'method' => $data->method,
	        'is_paid' => $data->isPaid(),
	        'status' => $data->status,
	        'remark' => $data->remark,
        ];
    }
}
